#pragma once
#include "renderable2d.h"

namespace Graphics
{
	class Animation :public Sprite
	{
	public:
		enum AniState
		{
			ANI_STOP = 0,
			ANI_PLAYING,
			ANI_PAUSE,
		};

	private:
		float m_Speed;
		AniState m_State;
		Position m_Pos;

	public:
		Animation(void);
		~Animation(void);

		AniState GetState(void);
		bool Load(std::string filename);
		bool Render(Graphic* pGraphic);
		bool Play(void);
		bool Stop(void);
		bool Pause(void);

		float GetSpeed(void);
		void SetSpeed(float speed);

		Position GetPos(void);
		void SetPos(int x,int y);

	};
}